package com.bcbim.operation_maintenance_interface.department.service;

import com.bcbim.common.sys.Code;
import com.bcbim.operation_maintenance_interface.department.dao.DepartmentDAO;
import com.bcbim.operation_maintenance_interface.department.dto.DepartmentNameCheckDTO;
import com.bcbim.operation_maintenance_interface.department.vo.DepartmentDetailVO;
import com.bcbim.operation_maintenance_interface.space.dto.SpaceColorTypeDTO;

import java.util.List;

/**
 * @Description:部门service
 * @Author xuehao
 * @Date 2022/03/09  15:57
 * @Version V1.0
 **/
public interface DepartmentService {

    /**
     * 业务部下拉
     *
     * @author xuehao
     * @createDate 2022/3/9 15:27
     * @retuen List<Code>
     */
    List<Code> pullBusinessDepartment(String projectId);

    /**
     * 新增部门
     *
     * @param departmentDAO
     * @author xuehao
     * @createDate 2022/3/9 15:37
     * @retuen int
     */
    int insertDepartment(DepartmentDAO departmentDAO);

    /**
     * 编辑部门
     *
     * @param departmentDAO
     * @author xuehao
     * @createDate 2022/3/9 15:45
     * @retuen int
     */
    int updateDepartment(DepartmentDAO departmentDAO);

    /**
     * 查询部门详情
     *
     * @author xuehao
     * @createDate 2022/3/9 16:21
     * @retuen DepartmentDetailVO
     */
    DepartmentDetailVO getDepartment(String id);

    /**
     * 判断部门名称是否重复
     *
     * @param departmentNameCheckDTO
     * @author xuehao
     * @createDate 2022/3/9 16:42
     * @retuen int
     */
    int checkDepartmentName(DepartmentNameCheckDTO departmentNameCheckDTO);

    /**
     * 颜色下拉
     *
     * @author xuehao
     * @createDate 2022/3/13 14:57
     * @retuen Code
     */
    List<Code> pullColour();

    /**
     * 查询颜色图例
     *
     * @author xuehao
     * @createDate 2022/3/13 15:41
     * @retuen List<Code>
     */
    List<Code> selectColourCutLine(SpaceColorTypeDTO spaceColorTypeDTO);

    /**
     * 获取未指派id
     *
     * @param businessDepartmentId
     * @param unassignedName
     * @return String
     * @Author: haomeijie
     * @Date: 2022/4/6 17:26
     */
    String getUnassignedId(String businessDepartmentId, String unassignedName);
}
